package tests;

import java.io.IOException;
import java.util.HashMap;

import log.Log;

import org.junit.Test;




public class LogTest {

	@Test
	public void testCSV() {
		try {
			Log log = new Log("test.csv");
			String[] labels = {"test1", "test2", "test3"};
			log.writeLabels(labels);
			HashMap<String, String> data = new HashMap<String, String>();
			data.put("test1", "100");
			data.put("test2", "100");
			data.put("test3", "100");
			log.writeData(data);
			data.put("test1", "110");
			data.put("test2", "110");
			data.put("test3", "110");
			log.writeData(data);
			data.put("test1", "120");
			data.put("test2", "120");
			data.put("test3", "120");
			log.writeData(data);
			log.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
